﻿@{
    ViewBag.Title = "系统参数设置";
}
@model DTcms.Model.userconfig
<form id="form1" class="layui-form" url="ConfigSave">
    @Html.AntiForgeryToken()
    <!--导航栏-->
    <div class="pageheader">
        <div class="page-bar">
            <ul class="page-breadcrumb">
                <li><a href="../users/mail_template_list" class="back"><i class="fa fa-mail-reply-all"></i> 返回列表页</a></li>
                <li><a href="javascript:;"><i class="iconfont icon-home1"></i> 首页</a> </li>
                <li><a href="javascript:;">会员设置</a> </li>
                <li><a href="javascript:;">参数设置</a> </li>
            </ul>
        </div>
    </div>
    <!--/导航栏-->
    <!--内容-->
    <div class="layui-fluid">
        <div class="layui-tab layui-tab-card">
            <ul class="layui-tab-title" id="floatHead">
                <li class="layui-this">基本参数设置</li>
                <li>用户积分策略</li>
                <li>文章投稿设置</li>
                <li>活动发布设置</li>
                <li>信息推广设置</li>
                <li>文章点赞设置</li>
            </ul>
            <div class="layui-tab-content">
                <!--用户参数设置-->
                <div class="layui-tab-item layui-show">
                    <div class="layui-form-item">
                        <label class="layui-form-label">新用户注册设置</label>
                        <div class="layui-input-block">
                            @Html.RadioButton("regstatus", 0, Model.regstatus == 0, new { title = "关闭注册" })
                            @Html.RadioButton("regstatus", 1, Model.regstatus == 1, new { title = "开放注册" })
                            @Html.RadioButton("regstatus", 2, Model.regstatus == 2, new { title = "手机注册" })
                            @Html.RadioButton("regstatus", 3, Model.regstatus == 3, new { title = "邮箱注册" })
                            @Html.RadioButton("regstatus", 4, Model.regstatus == 4, new { title = "邀请码" })
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">新用户注册审核</label>
                        <div class="layui-input-block">
                            @Html.CheckBox("regverify", Model.regverify == 1, new { title = "是" })
                            <span class="Validform_checktip">*是否需要人工审核通过后才能登录</span>
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">欢迎短消息类型</label>
                        <div class="layui-input-block">
                            @Html.RadioButton("regmsgstatus", "0", Model.regmsgstatus == 0, new { title = "不发送" })
                            @Html.RadioButton("regmsgstatus", "1", Model.regmsgstatus == 1, new { title = "站内消息" })
                            @Html.RadioButton("regmsgstatus", "2", Model.regmsgstatus == 2, new { title = "发送邮件" })
                            @Html.RadioButton("regmsgstatus", "3", Model.regmsgstatus == 3, new { title = "手机短信" })
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">欢迎短消息内容</label>
                        <div class="layui-input-block">
                            @Html.TextArea("regmsgtxt", Model.regmsgtxt, new { @class = "input" })
                            <span class="Validform_checktip">支持HTML</span>
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">用户名保留关健字</label>
                        <div class="layui-input-block">
                            @Html.TextBox("regkeywords", Model.regkeywords, new { @class = "input normal" })
                            <span class="Validform_checktip">*以英文逗号“,”分隔开</span>
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">IP注册间隔限制</label>
                        <div class="layui-input-block">
                            @Html.TextBox("regctrl", Model.regctrl, new { @class = "input small", datatype = "n", sucmsg = " " }) 小时
                            <span class="Validform_checktip">*同一IP的注册间隔，0为不限制</span>
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">手机验证码有效期</label>
                        <div class="layui-input-block">
                            @Html.TextBox("regsmsexpired", Model.regsmsexpired, new { @class = "input small", datatype = "n", sucmsg = " " }) 分钟
                            <span class="Validform_checktip">*新用户手机验证码有效期，整数须大于0</span>
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">邮件验证有效期</label>
                        <div class="layui-input-block">
                            @Html.TextBox("regemailexpired", Model.regemailexpired, new { @class = "input small", datatype = "n", sucmsg = " " }) 天
                            <span class="Validform_checktip">*新用户注册链接及验证邮件有效期，整数须大于0</span>
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">允许手机登录</label>
                        <div class="layui-input-block">
                            @Html.CheckBox("mobilelogin", Model.mobilelogin == 1, new { title = "是" })
                            <span class="Validform_checktip">*允许手机号码做为登录用户名</span>
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">允许邮箱登录</label>
                        <div class="layui-input-block">
                            @Html.CheckBox("emaillogin", Model.emaillogin == 1, new { title = "是" })
                            <span class="Validform_checktip">*允许邮箱登录时不能开启同邮箱注册多个用户</span>
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">开启注册协议</label>
                        <div class="layui-input-block">
                            @Html.CheckBox("regrules", Model.regrules == 1, new { title = "是" })
                            <span class="Validform_checktip">*开启后，用户必须同意才能注册</span>
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">注册协议内容</label>
                        <div class="layui-input-block">
                            @Html.TextArea("regrulestxt", Model.regrulestxt, new { @class = "input" })
                            <span class="Validform_checktip">支持HTML</span>
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">必须登录后评论</label>
                        <div class="layui-input-block">
                            @Html.CheckBox("iscomment", Model.iscomment == 1, new { title = "是" })
                            <span class="Validform_checktip">*开启后，用户必须登录后才能评论文章</span>
                        </div>
                    </div>
                </div>
                <!--/用户参数设置-->
                <!--用户积分策略-->
                <div class="layui-tab-item">
                    <div class="layui-form-item">
                        <label class="layui-form-label">邀请码使用期限</label>
                        <div class="layui-input-block">
                            @Html.TextBox("invitecodeexpired", Model.invitecodeexpired, new { @class = "input small", datatype = "n", sucmsg = " " }) 天
                            <span class="Validform_checktip">*邀请码有效天数，不可为0</span>
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">邀请码可使用次数</label>
                        <div class="layui-input-block">
                            @Html.TextBox("invitecodecount", Model.invitecodecount, new { @class = "input small", datatype = "n", sucmsg = " " }) 次
                            <span class="Validform_checktip">*邀请码使用次数，0为不限制</span>
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">每天申请邀请码数量</label>
                        <div class="layui-input-block">
                            @Html.TextBox("invitecodenum", Model.invitecodenum, new { @class = "input small", datatype = "n", sucmsg = " " }) 个
                            <span class="Validform_checktip">*每天可申请邀请码数量，0为不限制</span>
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">现金/积分兑换比例</label>
                        <div class="layui-input-block">
                            @Html.TextBox("pointcashrate", Model.pointcashrate, new { @class = "input small", datatype = "n", sucmsg = " " }) 个
                            <span class="Validform_checktip">*1元等于多少个积分，0为禁用兑换功能</span>
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">邀请注册获得积分</label>
                        <div class="layui-input-block">
                            @Html.TextBox("pointinvitenum", Model.pointinvitenum, new { @class = "input small", datatype = "n", sucmsg = " " }) 分
                            <span class="Validform_checktip">*邀请一个注册成功用户所获得的积分</span>
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">每天登录获得积分</label>
                        <div class="layui-input-block">
                            @Html.TextBox("pointloginnum", Model.pointloginnum, new { @class = "input small", datatype = "n", sucmsg = " " }) 分
                            <span class="Validform_checktip">*会员每天登录获得的积分，一天只赠送一次</span>
                        </div>
                    </div>
                </div>
                <!--/用户积分策略-->
                <!--文章投稿设置-->
                <div class="layui-tab-item">
                    <div class="layui-form-item">
                        <label class="layui-form-label">文章投稿支付</label>
                        <div class="layui-input-block">
                            @Html.RadioButton("articleadd", 0, Model.articleadd == 0, new { title = "免费" })
                            @Html.RadioButton("articleadd", 1, Model.articleadd == 1, new { title = "积分" })
                            @Html.RadioButton("articleadd", 2, Model.articleadd == 2, new { title = "支付币" })
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">需要支付</label>
                        <div class="layui-input-block">
                            @Html.TextBox("articleaddnum", Model.articleaddnum, new { @class = "input small", datatype = "n", sucmsg = " " })
                            <span class="Validform_checktip">*整数须大于0且类型不能使免费才有效</span>
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">文章投稿协议</label>
                        <div class="layui-input-block">
                            @Html.TextArea("articletxt", Model.articletxt, new { @class = "input" })
                            <span class="Validform_checktip">支持HTML</span>
                        </div>
                    </div>
                </div>
                <!--/活动设置-->
                <!--活动设置-->
                <div class="layui-tab-item">
                    <div class="layui-form-item">
                        <label class="layui-form-label">活动发布支付</label>
                        <div class="layui-input-block">
                            @Html.RadioButton("huodongadd", 0, Model.huodongadd == 0, new { title = "免费" })
                            @Html.RadioButton("huodongadd", 1, Model.huodongadd == 1, new { title = "积分" })
                            @Html.RadioButton("huodongadd", 2, Model.huodongadd == 2, new { title = "支付币" })
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">需要支付</label>
                        <div class="layui-input-block">
                            @Html.TextBox("huodongaddnum", Model.huodongaddnum, new { @class = "input small", datatype = "n", sucmsg = " " })
                            <span class="Validform_checktip">*整数须大于0且类型不能使免费才有效</span>
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">活动发布协议</label>
                        <div class="layui-input-block">
                            @Html.TextArea("huodongtxt", Model.huodongtxt, new { @class = "input" })
                            <span class="Validform_checktip">支持HTML</span>
                        </div>
                    </div>
                </div>
                <!--/活动设置-->
                <!--信息管理收费设置-->
                <div class="layui-tab-item">
                    <div class="layui-form-item">
                        <label class="layui-form-label">发布支付</label>
                        <div class="layui-input-block">
                            @Html.RadioButton("liveadd", 0, Model.liveadd == 0, new { title = "免费" })
                            @Html.RadioButton("liveadd", 1, Model.liveadd == 1, new { title = "积分" })
                            @Html.RadioButton("liveadd", 2, Model.liveadd == 2, new { title = "支付币" })
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">需要支付</label>
                        <div class="layui-input-block">
                            @Html.TextBox("liveaddnum", Model.liveaddnum, new { @class = "input small", datatype = "n", sucmsg = " " }) 个
                            <span class="Validform_checktip">*整数须大于0且类型不能使免费才有效</span>
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">信息推广支付</label>
                        <div class="layui-input-block">
                            @Html.RadioButton("livetuig", 1, Model.livetuig == 1, new { title = "积分" })
                            @Html.RadioButton("livetuig", 2, Model.livetuig == 2, new { title = "支付币" })
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">首页头条</label>
                        <div class="layui-input-block">
                            @Html.TextBox("liveindex", Model.liveindex, new { @class = "input small", datatype = "n", sucmsg = " " }) 个
                            <span class="Validform_checktip">*1天需要多少支付币或积分</span>
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">大类置顶</label>
                        <div class="layui-input-block">
                            @Html.TextBox("livebigtop", Model.livebigtop, new { @class = "input small", datatype = "n", sucmsg = " " }) 个
                            <span class="Validform_checktip">*1天需要多少支付币或积分</span>
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">刷新发布</label>
                        <div class="layui-input-block">
                            @Html.TextBox("liveflush", Model.liveflush, new { @class = "input small", datatype = "n", sucmsg = " " }) 个
                            <span class="Validform_checktip">*多少支付币、积分/条</span>
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">标题加粗</label>
                        <div class="layui-input-block">
                            @Html.TextBox("livepaybold", Model.livepaybold, new { @class = "input small", datatype = "n", sucmsg = " " }) 个
                            <span class="Validform_checktip">*多少支付币、积分/条</span>
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">标题加红</label>
                        <div class="layui-input-block">
                            @Html.TextBox("livepayred", Model.livepayred, new { @class = "input small", datatype = "n", sucmsg = " " }) 个
                            <span class="Validform_checktip">*多少支付币、积分/条</span>
                        </div>
                    </div>
                </div>
                <!--/信息管理收费设置-->
                <!--文章点赞设置-->
                <div class="layui-tab-item">
                    <div class="layui-form-item">
                        <label class="layui-form-label">用户是否需要登录</label>
                        <div class="layui-input-block">
                            @Html.CheckBox("articlelikelogin", Model.articlelikelogin == 1, new { title = "是" })
                            <span class="Validform_checktip">*注意：开启后需登录才可以点赞</span>
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">IP点赞间隔限制</label>
                        <div class="layui-input-block">
                            @Html.TextBox("articlelikectrl", Model.articlelikectrl, new { @class = "input small", datatype = "n", sucmsg = " " }) 小时
                            <span class="Validform_checktip">*同一IP的点赞间隔，0为不限制</span>
                        </div>
                    </div>
                </div>
                <!--/文章点赞设置-->
            </div>
        </div>
    </div>
    <!--/内容-->
    <!--工具栏-->
    <div class="page-footer">
        <div class="btn-wrap">
            <button class="layui-btn icon-btn" id="btnSubmit"><i class="layui-icon layui-icon-ok"></i>提交保存</button>
            <button class="layui-btn layui-btn-warm icon-btn" name="btnReturn" onclick="javascript:history.back(-1);"><i class="layui-icon layui-icon-return"></i>返回上一页</button>
        </div>
    </div>
    <!--/工具栏-->
</form>
@section Scripts{
    <script type="text/javascript">
        layui.use(['jqueryform', 'validform', 'element'], function () {
            //初始化表单验证
            $("#form1").initValidform('#btnSubmit', 1);
        });
    </script>
}